﻿/*
Copyright (c) 2010 Vratislav Cermak (vratacermak@gmail.com)
 
This file is part of TeachMe Project. See http://code.google.com/p/teach-me for more information.
 
TeachMe is an open source project. Using of TeachMe is free of charge.
It is distributed under GNU General Public License version 3 (GPLv3).
GPLv3 can be found at http://www.gnu.org/licenses/gpl.html.
 
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the license for more details.
*/

namespace TeachMe.Application.Forms.Options
{
    public partial class Priorities : OptionsControl
    {
        public Priorities()
        {
            InitializeComponent();
        }

        internal override void LoadOptions()
        {
            tbVeryLowPriority.Value = Root.UserSettings.VeryLowPriorityRate.Value;
            tbLowPriority.Value = Root.UserSettings.LowPriorityRate.Value;
            tbNormalPriority.Value = Root.UserSettings.NormalPriorityRate.Value;
            tbHighPriority.Value = Root.UserSettings.HighPriorityRate.Value;
        }

        internal override void SaveOptions()
        {
            Root.UserSettings.VeryLowPriorityRate.Value = tbVeryLowPriority.Value;
            Root.UserSettings.LowPriorityRate.Value = tbLowPriority.Value;
            Root.UserSettings.NormalPriorityRate.Value = tbNormalPriority.Value;
            Root.UserSettings.HighPriorityRate.Value = tbHighPriority.Value;
        }
    }
}
